<!DOCTYPE html>
<html>
<head>
    <title>添加图书</title>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
            max-width: 600px;
            margin: 0 auto;
            padding: 40px 20px;
            background: linear-gradient(135deg, #f6f8f9 0%, #e5ebee 100%);
            min-height: 100vh;
        }
        h1 {
            color: #2c3e50;
            text-align: center;
            margin-bottom: 40px;
            font-size: 2.5em;
            text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
            letter-spacing: 1px;
        }
        form {
            background-color: white;
            padding: 35px;
            border-radius: 20px;
            box-shadow: 0 8px 30px rgba(0,0,0,0.08);
        }
        .form-group {
            margin-bottom: 28px;
        }
        label {
            display: block;
            margin-bottom: 10px;
            color: #2c3e50;
            font-weight: 500;
            font-size: 1.1em;
            letter-spacing: 0.5px;
        }
        input[type="text"],
        input[type="date"] {
            width: 100%;
            padding: 14px 18px;
            border: 2px solid rgba(238,238,238,0.9);
            border-radius: 12px;
            box-sizing: border-box;
            font-size: 16px;
            transition: all 0.3s ease;
            background-color: rgba(248,249,250,0.5);
        }
        input[type="text"]:focus,
        input[type="date"]:focus {
            outline: none;
            border-color: #4CAF50;
            background-color: white;
            box-shadow: 0 0 0 4px rgba(76,175,80,0.1);
        }
        button {
            background: linear-gradient(45deg, #4CAF50, #45a049);
            color: white;
            padding: 16px 24px;
            border: none;
            border-radius: 30px;
            cursor: pointer;
            width: 100%;
            font-size: 16px;
            font-weight: 500;
            letter-spacing: 0.8px;
            transition: all 0.4s ease;
            box-shadow: 0 4px 15px rgba(76,175,80,0.2);
        }
        button:hover {
            transform: translateY(-3px);
            box-shadow: 0 6px 20px rgba(76,175,80,0.3);
            background: linear-gradient(45deg, #45a049, #4CAF50);
        }
        .back-link {
            display: block;
            text-align: center;
            margin-top: 30px;
            color: #2c3e50;
            text-decoration: none;
            font-weight: 500;
            letter-spacing: 0.5px;
            transition: all 0.3s ease;
        }
        .back-link:hover {
            color: #4CAF50;
            transform: translateY(-2px);
        }
    </style>
</head>
<body>
    <h1>添加新书</h1>
    <form method="post">
        {% csrf_token %}
        <div class="form-group">
            <label for="title">书名:</label>
            <input type="text" id="title" name="title" required>
        </div>
        <div class="form-group">
            <label for="author">作者:</label>
            <input type="text" id="author" name="author" required>
        </div>
        <div class="form-group">
            <label for="publish_date">出版日期:</label>
            <input type="date" id="publish_date" name="publish_date" required>
        </div>
        <button type="submit">添加</button>
    </form>
    <a href="{% url 'book_list' %}" class="back-link">返回列表</a>
</body>
</html>
